#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

f.add(from_string = 'Polarizable embedding energy contributions:',
      num_lines = 34,
      abs_tolerance = 1.0e-5)

f.add(from_string = 'Dipole moment components',
      num_lines = 10,
      abs_tolerance = 1.0e-4)

f.add(from_string = 'Electric transition dipole moments (au)',
      ignore_sign = True,
      num_lines = 12,
      abs_tolerance = 1.0e-4)

test.run(['pehf_direct.dal'], ['pehf_direct.mol'], ['pehf_direct.pot'], f={'out': f})

sys.exit(test.return_code)
